Previous page Next page

CSS Background Properties

The Background properties control the element background color, set an image as the background, repeat a background image vertically or horizontally, and position an image on a page.

Property
Description
Value
Supported
background-color
Sets the background color of an element.
color-hex
color-name
transparent
Supported.

Property
Description
Default Value
Notes
background-color
Sets the background color of content and padding. Used to paint the background color of the screen.
transparent

If a background color is set, set the foreground to a contrasting color, so that its content remains visible. The transparent value allows the color of the parent element to show.



Previous page Next page